package leetcode.code1109;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

/**
 * @author Max
 * @date 2021年8月31日
 * @description https://leetcode-cn.com/problems/corporate-flight-bookings/ <br>
 *              1109. 航班预订统计
 */
public abstract class Solution1109 implements IDebug {

	public abstract int[] corpFlightBookings(int[][] bookings, int n);

	@Override
	public void debug1() {
		String bookings = "[[1,2,10],[2,3,20],[2,5,25]]";
		int n = 5;
		String expect = "[10,55,45,25,25]";
		this.debug(bookings, n, expect);
	}

	private void debug(String bookings, int n, String expects) {
		int[][] array = HelpDebug.str2array1(bookings);
		int[] result = this.corpFlightBookings(array, n);
		int[] expect = HelpDebug.str2array3(expects);
		HelpDebug.compare(expect, result);
	}

	@Override
	public void debug2() {
		String bookings = "[[1,2,10],[2,2,15]]";
		int n = 2;
		String expect = "[10,25]";
		this.debug(bookings, n, expect);
	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

}
